Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR consolidates the x402 payment system by removing the old v1 protocol and network selection, standardizing on x402v2 with Base Testnet (eip155:84532) as the only supported network.
Changes:
- Removed x402v1 protocol support and x402Network enum
- Consolidated LLM server URLs to single endpoints (llm.opengradient.ai)
- Deleted x402_auth.py module and removed network parameter from all LLM functions
- Updated dependencies to use only og-test-v2-x402==0.0.9
Reviewed changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/opengradient/types.py | Removed x402Network enum that allowed switching between og-evm and base-testnet |
| src/opengradient/defaults.py | Consolidated duplicate V1/V2 LLM server URLs and removed network filter default |
| src/opengradient/client/x402_auth.py | Deleted entire file containing X402Auth class for v1 protocol |
| src/opengradient/client/llm.py | Removed v1 imports, network parameter, and old make_request() implementations; standardized on make_request_v2() with x402v2 client |
| src/opengradient/cli.py | Removed --network CLI option and x402Networks dictionary |
| requirements.txt | Removed og-test-x402==0.0.9, updated og-test-v2-x402 from 0.0.6 to 0.0.9 |
| pyproject.toml | Same dependency changes as requirements.txt |
| examples/x402_permit2.py | Removed network parameter from check_permit2_approval function |
| examples/run_x402_llm_stream.py | Removed network variable and parameter from chat call |
| examples/run_x402_llm.py | Removed network variable and parameter from chat call |
| docs/opengradient/index.md | Updated default LLM server URLs in documentation |
| docs/opengradient/client/index.md | Updated default LLM server URLs in documentation |
| docs/opengradient/client/client.md | Updated default LLM server URLs in documentation |
| Makefile | Consolidated chat-og-evm and chat-base-testnet targets into single chat target |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| """ | ||
|
|
||
| async def make_request(): | ||
| async def make_request_v2(): |
There was a problem hiding this comment.
The function make_request() has been renamed to make_request_v2(), but the call site at line 153 still references make_request() which no longer exists. This will cause a NameError at runtime. The call at line 153 needs to be updated to asyncio.run(make_request_v2()).
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.